﻿using System.Data.Linq;
using System.Data.Linq.Mapping;

namespace WeiboPlus.Models
{
    [Table(Name = "sns_count")]
    public class SNSCounts : NotificationObject
    {
        int _accountId;
        [Column(Name = "accid", IsPrimaryKey = true)]
        public int AccountId
        {
            get
            {
                return _accountId;
            }
            set
            {
                if (_accountId != value)
                {
                    RaisePropertyChanging(() => AccountId);
                    _accountId = value;
                    RaisePropertyChanged(() => AccountId);
                }
            }
        }

        long _statusId;
        [Column(Name = "staid", IsPrimaryKey = true)]
        public long StatusId
        {
            get
            {
                return _statusId;
            }
            set
            {
                if (_statusId != value)
                {
                    RaisePropertyChanging(() => StatusId);
                    _statusId = value;
                    RaisePropertyChanged(() => StatusId);
                }
            }
        }

        int _status = 0;
        [Column(Name = "sc")]
        public int Status
        {
            get
            {
                return _status;
            }
            set
            {
                RaisePropertyChanging("Status");
                _status = value;
                RaisePropertyChanged("Status");
            }
        }

        int _followers = 0;
        [Column(Name = "fc")]
        public int Followers
        {
            get
            {
                return _followers;
            }
            set
            {
                RaisePropertyChanging("Followers");
                _followers = value;
                RaisePropertyChanged("Followers");
            }
        }

        int _privateMessage = 0;
        [Column(Name = "pmc")]
        public int PrivateMessage
        {
            get
            {
                return _privateMessage;
            }
            set
            {
                RaisePropertyChanging("PrivateMessage");
                _privateMessage = value;
                RaisePropertyChanged("PrivateMessage");
            }
        }

        int _mentions = 0;
        [Column(Name = "mc")]
        public int Mentions
        {
            get
            {
                return _mentions;
            }
            set
            {
                RaisePropertyChanging("Mentions");
                _mentions = value;
                RaisePropertyChanged("Mentions");
            }
        }

        int _comments = 0;
        [Column(Name = "cc")]
        public int Comments
        {
            get
            {
                return _comments;
            }
            set
            {
                RaisePropertyChanging("Comments");
                _comments = value;
                RaisePropertyChanged("Comments");
            }
        }

        [Column(IsVersion = true)]
#pragma warning disable 0168, 0169
        private Binary _version;
#pragma warning restore 0168, 0169
    }
}
